#include "combomessagebox.h"
#include "ui_combomessagebox.h"

ComboMessageBox::ComboMessageBox(QWidget *parent) :
    QDialog(parent),
    ui(new Ui::ComboMessageBox)
{
    ui->setupUi(this);
}

ComboMessageBox::~ComboMessageBox()
{
    delete ui;
}

void ComboMessageBox::setLabelText(QString text)
{
    ui->label->setText(text);
}

void ComboMessageBox::setComboModel(QAbstractItemModel* model)
{
    ui->comboBox->setModel(model);
}

QModelIndex ComboMessageBox::selectedItem() const
{
    return ui->comboBox->model()->index(
            ui->comboBox->currentIndex(), 0);
}

QString ComboMessageBox::selectedText() const
{
    return ui->comboBox->currentText();
}
